home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / texinfo.info-1.z / texinfo.info-1
Encoding:
GNU Info File  |  1998-05-21  |  47.8 KB  |  1,048 lines

  1. This is Info file ../info/texinfo.info, produced by Makeinfo version
  2. 1.68 from the input file texinfo.texi.
  3.  
  4. INFO-DIR-SECTION Texinfo documentation system
  5. START-INFO-DIR-ENTRY
  6. * Texinfo: (texinfo).           The GNU documentation format.
  7. * install-info: (texinfo)Invoking install-info. Updating info/dir entries.
  8. * texi2dvi: (texinfo)Format with texi2dvi.      Printing Texinfo documentation.
  9. * texindex: (texinfo)Format with tex/texindex.  Sorting Texinfo index files.
  10. * makeinfo: (texinfo)makeinfo Preferred.        Translate Texinfo source.
  11. END-INFO-DIR-ENTRY
  12.  
  13.   This file documents Texinfo, a documentation system that can produce
  14. both on-line information and a printed manual from a single source file.
  15.  
  16.   Copyright (C) 1988, 90, 91, 92, 93, 95, 96, 97 Free Software
  17. Foundation, Inc.
  18.  
  19.   This is the second edition of the Texinfo documentation,
  20. and is consistent with version 2 of `texinfo.tex'.
  21.  
  22.   Permission is granted to make and distribute verbatim copies of this
  23. manual provided the copyright notice and this permission notice are
  24. preserved on all copies.
  25.  
  26.   Permission is granted to copy and distribute modified versions of this
  27. manual under the conditions for verbatim copying, provided that the
  28. entire resulting derived work is distributed under the terms of a
  29. permission notice identical to this one.
  30.  
  31.   Permission is granted to copy and distribute translations of this
  32. manual into another language, under the above conditions for modified
  33. versions, except that this permission notice may be stated in a
  34. translation approved by the Free Software Foundation.
  35.  
  36. 
  37. File: texinfo.info,  Node: Top,  Next: Copying,  Prev: (dir),  Up: (dir)
  38.  
  39. Texinfo
  40. *******
  41.  
  42.   Texinfo is a documentation system that uses a single source file to
  43. produce both on-line information and printed output.
  44.  
  45.   The first part of this master menu lists the major nodes in this Info
  46. document, including the @-command and concept indices.  The rest of the
  47. menu lists all the lower level nodes in the document.
  48.  
  49.   This is Edition 2.24 of the Texinfo documentation, 25 July 1997, for
  50. Texinfo Version Three.
  51.  
  52. * Menu:
  53.  
  54. * Copying::                     Your rights.
  55. * Overview::                    Texinfo in brief.
  56. * Texinfo Mode::                How to use Texinfo mode.
  57. * Beginning a File::            What is at the beginning of a Texinfo file?
  58. * Ending a File::               What is at the end of a Texinfo file?
  59. * Structuring::                 How to create chapters, sections, subsections,
  60.                                   appendices, and other parts.
  61. * Nodes::                       How to write nodes.
  62. * Menus::                       How to write menus.
  63. * Cross References::            How to write cross references.
  64. * Marking Text::                How to mark words and phrases as code,
  65.                                   keyboard input, meta-syntactic
  66.                                   variables, and the like.
  67. * Quotations and Examples::     How to write quotations, examples, etc.
  68. * Lists and Tables::            How to write lists and tables.
  69. * Indices::                     How to create indices.
  70. * Insertions::                  How to insert @-signs, braces, etc.
  71. * Breaks::                      How to force and prevent line and page breaks.
  72. * Definition Commands::         How to describe functions and the like
  73.                                   in a uniform manner.
  74. * Footnotes::                   How to write footnotes.
  75. * Conditionals::                How to specify text for either TeX or Info.
  76. * Macros::                      Defining new Texinfo commands.
  77. * Format/Print Hardcopy::       How to convert a Texinfo file to a file
  78.                                   for printing and how to print that file.
  79. * Create an Info File::         Convert a Texinfo file into an Info file.
  80. * Install an Info File::        Make an Info file accessible to users.
  81. * Command List::                All the Texinfo @-commands.
  82. * Tips::                        Hints on how to write a Texinfo document.
  83. * Sample Texinfo File::         A sample Texinfo file to look at.
  84. * Sample Permissions::          Tell readers they have the right to copy
  85.                                   and distribute.
  86. * Include Files::               How to incorporate other Texinfo files.
  87. * Headings::                    How to write page headings and footings.
  88. * Catching Mistakes::           How to find formatting mistakes.
  89. * Refilling Paragraphs::        All about paragraph refilling.
  90. * Command Syntax::              A description of @-Command syntax.
  91. * Obtaining TeX::               How to Obtain TeX.
  92. * Command and Variable Index::  A menu containing commands and variables.
  93. * Concept Index::               A menu covering many topics.
  94.  
  95.  
  96.  -- The Detailed Node Listing --
  97.  
  98. Overview of Texinfo
  99.  
  100. * Using Texinfo::               Create a conventional printed book
  101.                                   or an Info file.
  102. * Info Files::                  What is an Info file?
  103. * Printed Books::               Characteristics of a printed book or manual.
  104. * Formatting Commands::         @-commands are used for formatting.
  105. * Conventions::                 General rules for writing a Texinfo file.
  106. * Comments::                    How to write comments and mark regions that
  107.                                   the formatting commands will ignore.
  108. * Minimum::                     What a Texinfo file must have.
  109. * Six Parts::                   Usually, a Texinfo file has six parts.
  110. * Short Sample::                A short sample Texinfo file.
  111. * Acknowledgements::
  112.  
  113. Using Texinfo Mode
  114.  
  115. * Texinfo Mode Overview::       How Texinfo mode can help you.
  116. * Emacs Editing::               Texinfo mode adds to GNU Emacs' general
  117.                                   purpose editing features.
  118. * Inserting::                   How to insert frequently used @-commands.
  119. * Showing the Structure::       How to show the structure of a file.
  120. * Updating Nodes and Menus::    How to update or create new nodes and menus.
  121. * Info Formatting::             How to format for Info.
  122. * Printing::                    How to format and print part or all of a file.
  123. * Texinfo Mode Summary::        Summary of all the Texinfo mode commands.
  124.  
  125. Updating Nodes and Menus
  126.  
  127. * Updating Commands::           Five major updating commands.
  128. * Updating Requirements::       How to structure a Texinfo file for
  129.                                   using the updating command.
  130. * Other Updating Commands::     How to indent descriptions, insert
  131.                                   missing nodes lines, and update
  132.                                   nodes in sequence.
  133.  
  134. Beginning a Texinfo File
  135.  
  136. * Four Parts::                  Four parts begin a Texinfo file.
  137. * Sample Beginning::            Here is a sample beginning for a Texinfo file.
  138. * Header::                      The very beginning of a Texinfo file.
  139. * Info Summary and Permissions::  Summary and copying permissions for Info.
  140. * Titlepage & Copyright Page::  Creating the title and copyright pages.
  141. * The Top Node::                Creating the `Top' node and master menu.
  142. * Software Copying Permissions::  Ensure that you and others continue to
  143.                                   have the right to use and share software.
  144.  
  145. The Texinfo File Header
  146.  
  147. * First Line::                  The first line of a Texinfo file.
  148. * Start of Header::             Formatting a region requires this.
  149. * setfilename::                 Tell Info the name of the Info file.
  150. * settitle::                    Create a title for the printed work.
  151. * setchapternewpage::           Start chapters on right-hand pages.
  152. * paragraphindent::             An option to specify paragraph indentation.
  153. * End of Header::               Formatting a region requires this.
  154.  
  155. The Title and Copyright Pages
  156.  
  157. * titlepage::                   Create a title for the printed document.
  158. * titlefont center sp::         The `@titlefont', `@center',
  159.                                   and `@sp' commands.
  160. * title subtitle author::       The `@title', `@subtitle',
  161.                                   and `@author' commands.
  162. * Copyright & Permissions::     How to write the copyright notice and
  163.                                   include copying permissions.
  164. * end titlepage::               Turn on page headings after the title and
  165.                                   copyright pages.
  166. * headings on off::             An option for turning headings on and off
  167.                                   and double or single sided printing.
  168.  
  169. The `Top' Node and Master Menu
  170.  
  171. * Title of Top Node::           Sketch what the file is about.
  172. * Master Menu Parts::           A master menu has three or more parts.
  173.  
  174. Ending a Texinfo File
  175.  
  176. * Printing Indices & Menus::    How to print an index in hardcopy and
  177.                                   generate index menus in Info.
  178. * Contents::                    How to create a table of contents.
  179. * File End::                    How to mark the end of a file.
  180.  
  181. Chapter Structuring
  182.  
  183. * Tree Structuring::            A manual is like an upside down tree ...
  184. * Structuring Command Types::   How to divide a manual into parts.
  185. * makeinfo top::                The `@top' command, part of the `Top' node.
  186. * chapter::
  187. * unnumbered & appendix::
  188. * majorheading & chapheading::
  189. * section::
  190. * unnumberedsec appendixsec heading::
  191. * subsection::
  192. * unnumberedsubsec appendixsubsec subheading::
  193. * subsubsection::               Commands for the lowest level sections.
  194. * Raise/lower sections::        How to change commands' hierarchical level.
  195.  
  196. Nodes
  197.  
  198. * Two Paths::                   Different commands to structure
  199.                                   Info output and printed output.
  200. * Node Menu Illustration::      A diagram, and sample nodes and menus.
  201. * node::                        How to write a node, in detail.
  202. * makeinfo Pointer Creation::   How to create node pointers with `makeinfo'.
  203.  
  204. The `@node' Command
  205.  
  206. * Node Names::                  How to choose node and pointer names.
  207. * Writing a Node::              How to write an `@node' line.
  208. * Node Line Tips::              Keep names short.
  209. * Node Line Requirements::      Keep names unique, without @-commands.
  210. * First Node::                  How to write a `Top' node.
  211. * makeinfo top command::        How to use the `@top' command.
  212. * Top Node Summary::            Write a brief description for readers.
  213.  
  214. Menus
  215.  
  216. * Menu Location::               Put a menu in a short node.
  217. * Writing a Menu::              What is a menu?
  218. * Menu Parts::                  A menu entry has three parts.
  219. * Less Cluttered Menu Entry::   Two part menu entry.
  220. * Menu Example::                Two and three part menu entries.
  221. * Other Info Files::            How to refer to a different Info file.
  222.  
  223. Cross References
  224.  
  225. * References::                  What cross references are for.
  226. * Cross Reference Commands::    A summary of the different commands.
  227. * Cross Reference Parts::       A cross reference has several parts.
  228. * xref::                        Begin a reference with `See' ...
  229. * Top Node Naming::             How to refer to the beginning of another file.
  230. * ref::                         A reference for the last part of a sentence.
  231. * pxref::                       How to write a parenthetical cross reference.
  232. * inforef::                     How to refer to an Info-only file.
  233. * uref::                        How to refer to a uniform resource locator.
  234.  
  235. `@xref'
  236.  
  237. * Reference Syntax::            What a reference looks like and requires.
  238. * One Argument::                `@xref' with one argument.
  239. * Two Arguments::               `@xref' with two arguments.
  240. * Three Arguments::             `@xref' with three arguments.
  241. * Four and Five Arguments::     `@xref' with four and five arguments.
  242.  
  243. Marking Words and Phrases
  244.  
  245. * Indicating::                  How to indicate definitions, files, etc.
  246. * Emphasis::                    How to emphasize text.
  247.  
  248. Indicating Definitions, Commands, etc.
  249.  
  250. * Useful Highlighting::         Highlighting provides useful information.
  251. * code::                        How to indicate code.
  252. * kbd::                         How to show keyboard input.
  253. * key::                         How to specify keys.
  254. * samp::                        How to show a literal sequence of characters.
  255. * var::                         How to indicate a metasyntactic variable.
  256. * file::                        How to indicate the name of a file.
  257. * dfn::                         How to specify a definition.
  258. * cite::                        How to refer to a book that is not in Info.
  259. * url::                         How to indicate a world wide web reference.
  260. * email::                       How to indicate an electronic mail address.
  261.  
  262. Emphasizing Text
  263.  
  264. * emph & strong::               How to emphasize text in Texinfo.
  265. * Smallcaps::                   How to use the small caps font.
  266. * Fonts::                       Various font commands for printed output.
  267. * Customized Highlighting::     How to define highlighting commands.
  268.  
  269. Quotations and Examples
  270.  
  271. * Block Enclosing Commands::    Use different constructs for
  272.                                   different purposes.
  273. * quotation::                   How to write a quotation.
  274. * example::                     How to write an example in a fixed-width font.
  275. * noindent::                    How to prevent paragraph indentation.
  276. * Lisp Example::                How to illustrate Lisp code.
  277. * smallexample & smalllisp::    Forms for the `@smallbook' option.
  278. * display::                     How to write an example in the current font.
  279. * format::                      How to write an example that does not narrow
  280.                                   the margins.
  281. * exdent::                      How to undo the indentation of a line.
  282. * flushleft & flushright::      How to push text flushleft or flushright.
  283. * cartouche::                   How to draw cartouches around examples.
  284.  
  285. Lists and Tables
  286.  
  287. * Introducing Lists::           Texinfo formats lists for you.
  288. * itemize::                     How to construct a simple list.
  289. * enumerate::                   How to construct a numbered list.
  290. * Two-column Tables::           How to construct a two-column table.
  291. * Multi-column Tables::         How to construct generalized tables.
  292.  
  293. Making a Two-column Table
  294.  
  295. * table::                       How to construct a two-column table.
  296. * ftable vtable::               Automatic indexing for two-column tables.
  297. * itemx::                       How to put more entries in the first column.
  298.  
  299. Multi-column Tables
  300.  
  301. * Multitable Column Widths::    Defining multitable column widths.
  302. * Multitable Rows::             Defining multitable rows, with examples.
  303.  
  304. Creating Indices
  305.  
  306. * Index Entries::               Choose different words for index entries.
  307. * Predefined Indices::          Use different indices for different kinds
  308.                                   of entry.
  309. * Indexing Commands::           How to make an index entry.
  310. * Combining Indices::           How to combine indices.
  311. * New Indices::                 How to define your own indices.
  312.  
  313. Combining Indices
  314.  
  315. * syncodeindex::                How to merge two indices, using `@code'
  316.                                   font for the merged-from index.
  317. * synindex::                    How to merge two indices, using the
  318.                                   default font of the merged-to index.
  319.  
  320. Special Insertions
  321.  
  322. * Braces Atsigns::              How to insert braces, `@'.
  323. * Inserting Space::             How to insert the right amount of space
  324.                                   within a sentence.
  325. * Inserting Accents::           How to insert accents and special characters.
  326. * Dots Bullets::                How to insert dots and bullets.
  327. * TeX and copyright::           How to insert the TeX logo
  328.                                   and the copyright symbol.
  329. * pounds::                      How to insert the pounds currency symbol.
  330. * minus::                       How to insert a minus sign.
  331. * math::                        How to format a mathematical expression.
  332. * Glyphs::                      How to indicate results of evaluation,
  333.                                   expansion of macros, errors, etc.
  334. * Images::                      How to include graphics.
  335.  
  336. Inserting @ and Braces
  337.  
  338. * Inserting An Atsign::         How to insert `@'.
  339. * Inserting Braces::            How to insert `{' and `}'.
  340.  
  341. Inserting Space
  342.  
  343. * Not Ending a Sentence::       Sometimes a . doesn't end a sentence.
  344. * Ending a Sentence::           Sometimes it does.
  345. * Multiple Spaces::             Inserting multiple spaces.
  346. * dmn::                         How to format a dimension.
  347.  
  348. Inserting Ellipsis, Dots, and Bullets
  349.  
  350. * dots::                        How to insert dots ...
  351. * bullet::                      How to insert a bullet.
  352.  
  353. Inserting TeX and the Copyright Symbol
  354.  
  355. * tex::                         How to insert the TeX logo.
  356. * copyright symbol::            How to use `@copyright'{}.
  357.  
  358. Glyphs for Examples
  359.  
  360. * Glyphs Summary::
  361. * result::                      How to show the result of expression.
  362. * expansion::                   How to indicate an expansion.
  363. * Print Glyph::                 How to indicate printed output.
  364. * Error Glyph::                 How to indicate an error message.
  365. * Equivalence::                 How to indicate equivalence.
  366. * Point Glyph::                 How to indicate the location of point.
  367.  
  368. Glyphs Summary
  369.  
  370. * result::
  371. * expansion::
  372. * Print Glyph::
  373. * Error Glyph::
  374. * Equivalence::
  375. * Point Glyph::
  376.  
  377. Making and Preventing Breaks
  378.  
  379. * Break Commands::              Cause and prevent splits.
  380. * Line Breaks::                 How to force a single line to use two lines.
  381. * - and hyphenation::           How to tell TeX about hyphenation points.
  382. * w::                           How to prevent unwanted line breaks.
  383. * sp::                          How to insert blank lines.
  384. * page::                        How to force the start of a new page.
  385. * group::                       How to prevent unwanted page breaks.
  386. * need::                        Another way to prevent unwanted page breaks.
  387.  
  388. Definition Commands
  389.  
  390. * Def Cmd Template::            How to structure a description using a
  391.                                   definition command.
  392. * Optional Arguments::          How to handle optional and repeated arguments.
  393. * deffnx::                      How to group two or more `first' lines.
  394. * Def Cmds in Detail::          All the definition commands.
  395. * Def Cmd Conventions::         Conventions for writing definitions.
  396. * Sample Function Definition::
  397.  
  398. The Definition Commands
  399.  
  400. * Functions Commands::          Commands for functions and similar entities.
  401. * Variables Commands::          Commands for variables and similar entities.
  402. * Typed Functions::             Commands for functions in typed languages.
  403. * Typed Variables::             Commands for variables in typed languages.
  404. * Abstract Objects::            Commands for object-oriented programming.
  405. * Data Types::                  The definition command for data types.
  406.  
  407. Footnotes
  408.  
  409. * Footnote Commands::           How to write a footnote in Texinfo.
  410. * Footnote Styles::             Controlling how footnotes appear in Info.
  411.  
  412. Conditionally Visible Text
  413.  
  414. * Conditional Commands::        Specifying text for HTML, Info, or TeX.
  415. * Conditional Not Commands::    Specifying text for not HTML, Info, or TeX.
  416. * Raw Formatter Commands::      Using raw TeX or HTML commands.
  417. * set clear value::             Designating which text to format (for
  418.                                   all output formats); and how to set a
  419.                                   flag to a string that you can insert.
  420.  
  421. `@set', `@clear', and `@value'
  422.  
  423. * ifset ifclear::               Format a region if a flag is set.
  424. * value::                       Replace a flag with a string.
  425. * value Example::               An easy way to update edition information.
  426.  
  427. Macros: Defining New Texinfo Commands
  428.  
  429. * Defining Macros::             Both defining and undefining new commands.
  430. * Invoking Macros::             Using a macro, once you've defined it.
  431.  
  432. Format and Print Hardcopy
  433.  
  434. * Use TeX::                     Use TeX to format for hardcopy.
  435. * Format with tex/texindex::    How to format in a shell.
  436. * Format with texi2dvi::        A simpler way to use the shell.
  437. * Print with lpr::              How to print.
  438. * Within Emacs::                How to format and print from an Emacs shell.
  439. * Texinfo Mode Printing::       How to format and print in Texinfo mode.
  440. * Compile-Command::             How to print using Emacs's compile command.
  441. * Requirements Summary::        TeX formatting requirements summary.
  442. * Preparing for TeX::           What you need to do to use TeX.
  443. * Overfull hboxes::             What are and what to do with overfull hboxes.
  444. * smallbook::                   How to print small format books and manuals.
  445. * A4 Paper::                    How to print on European A4 paper.
  446. * Cropmarks and Magnification::  How to print marks to indicate the size
  447.                                 of pages and how to print scaled up output.
  448.  
  449. Creating an Info File
  450.  
  451. * makeinfo advantages::         `makeinfo' provides better error checking.
  452. * Invoking makeinfo::           How to run `makeinfo' from a shell.
  453. * makeinfo options::            Specify fill-column and other options.
  454. * Pointer Validation::          How to check that pointers point somewhere.
  455. * makeinfo in Emacs::           How to run `makeinfo' from Emacs.
  456. * texinfo-format commands::     Two Info formatting commands written
  457.                                   in Emacs Lisp are an alternative
  458.                                   to `makeinfo'.
  459. * Batch Formatting::            How to format for Info in Emacs Batch mode.
  460. * Tag and Split Files::         How tagged and split files help Info
  461.                                   to run better.
  462.  
  463. Installing an Info File
  464.  
  465. * Directory file::              The top level menu for all Info files.
  466. * New Info File::               Listing a new info file.
  467. * Other Info Directories::      How to specify Info files that are
  468.                                   located in other directories.
  469. * Installing Dir Entries::      How to specify what menu entry to add
  470.                                   to the Info directory.
  471. * Invoking install-info::       `install-info' options.
  472.  
  473. Sample Permissions
  474.  
  475. * Inserting Permissions::       How to put permissions in your document.
  476. * ifinfo Permissions::          Sample `ifinfo' copying permissions.
  477. * Titlepage Permissions::       Sample Titlepage copying permissions.
  478.  
  479. Include Files
  480.  
  481. * Using Include Files::         How to use the `@include' command.
  482. * texinfo-multiple-files-update::  How to create and update nodes and
  483.                                   menus when using included files.
  484. * Include File Requirements::   What `texinfo-multiple-files-update' expects.
  485. * Sample Include File::         A sample outer file with included files
  486.                                   within it; and a sample included file.
  487. * Include Files Evolution::     How use of the `@include' command
  488.                                   has changed over time.
  489.  
  490. Page Headings
  491.  
  492. * Headings Introduced::         Conventions for using page headings.
  493. * Heading Format::              Standard page heading formats.
  494. * Heading Choice::              How to specify the type of page heading.
  495. * Custom Headings::             How to create your own headings and footings.
  496.  
  497. Formatting Mistakes
  498.  
  499. * makeinfo Preferred::          `makeinfo' finds errors.
  500. * Debugging with Info::         How to catch errors with Info formatting.
  501. * Debugging with TeX::          How to catch errors with TeX formatting.
  502. * Using texinfo-show-structure::  How to use `texinfo-show-structure'.
  503. * Using occur::                 How to list all lines containing a pattern.
  504. * Running Info-Validate::       How to find badly referenced nodes.
  505.  
  506. Finding Badly Referenced Nodes
  507.  
  508. * Using Info-validate::         How to run `Info-validate'.
  509. * Unsplit::                     How to create an unsplit file.
  510. * Tagifying::                   How to tagify a file.
  511. * Splitting::                   How to split a file manually.
  512.  
  513. How to Obtain TeX
  514.  
  515. * New Texinfo Mode Commands::   The updating commands are especially useful.
  516. * New Commands::                Many newly described @-commands.
  517.  
  518. 
  519. File: texinfo.info,  Node: Copying,  Next: Overview,  Prev: Top,  Up: Top
  520.  
  521. Texinfo Copying Conditions
  522. **************************
  523.  
  524.   The programs currently being distributed that relate to Texinfo
  525. include portions of GNU Emacs, plus other separate programs (including
  526. `makeinfo', `info', `texindex', and `texinfo.tex').  These programs are
  527. "free"; this means that everyone is free to use them and free to
  528. redistribute them on a free basis.  The Texinfo-related programs are
  529. not in the public domain; they are copyrighted and there are
  530. restrictions on their distribution, but these restrictions are designed
  531. to permit everything that a good cooperating citizen would want to do.
  532. What is not allowed is to try to prevent others from further sharing
  533. any version of these programs that they might get from you.
  534.  
  535.   Specifically, we want to make sure that you have the right to give
  536. away copies of the programs that relate to Texinfo, that you receive
  537. source code or else can get it if you want it, that you can change these
  538. programs or use pieces of them in new free programs, and that you know
  539. you can do these things.
  540.  
  541.   To make sure that everyone has such rights, we have to forbid you to
  542. deprive anyone else of these rights.  For example, if you distribute
  543. copies of the Texinfo related programs, you must give the recipients all
  544. the rights that you have.  You must make sure that they, too, receive or
  545. can get the source code.  And you must tell them their rights.
  546.  
  547.   Also, for our own protection, we must make certain that everyone finds
  548. out that there is no warranty for the programs that relate to Texinfo.
  549. If these programs are modified by someone else and passed on, we want
  550. their recipients to know that what they have is not what we distributed,
  551. so that any problems introduced by others will not reflect on our
  552. reputation.
  553.  
  554.   The precise conditions of the licenses for the programs currently
  555. being distributed that relate to Texinfo are found in the General Public
  556. Licenses that accompany them.
  557.  
  558. 
  559. File: texinfo.info,  Node: Overview,  Next: Texinfo Mode,  Prev: Copying,  Up: Top
  560.  
  561. Overview of Texinfo
  562. *******************
  563.  
  564.   "Texinfo"(1) (*note Overview-Footnotes::) is a documentation system
  565. that uses a single source file to produce both on-line information and
  566. printed output.  This means that instead of writing two different
  567. documents, one for the on-line help or other on-line information and
  568. the other for a typeset manual or other printed work, you need write
  569. only one document.  When the work is revised, you need revise only one
  570. document.  (You can read the on-line information, known as an "Info
  571. file", with an Info documentation-reading program.)
  572.  
  573. * Menu:
  574.  
  575. * Using Texinfo::               Create a conventional printed book
  576.                                   or an Info file.
  577. * Info Files::                  What is an Info file?
  578. * Printed Books::               Characteristics of a printed book or manual.
  579. * Formatting Commands::         @-commands are used for formatting.
  580. * Conventions::                 General rules for writing a Texinfo file.
  581. * Comments::                    How to write comments and mark regions that
  582.                                   the formatting commands will ignore.
  583. * Minimum::                     What a Texinfo file must have.
  584. * Six Parts::                   Usually, a Texinfo file has six parts.
  585. * Short Sample::                A short sample Texinfo file.
  586. * Acknowledgements::
  587.  
  588. 
  589. File: texinfo.info,  Node: Overview-Footnotes,  Up: Overview
  590.  
  591.   (1) Note that the first syllable of "Texinfo" is pronounced like
  592. "speck", not "hex".  This odd pronunciation is derived from, but is not
  593. the same as, the pronunciation of TeX.  In the word TeX, the `X' is
  594. actually the Greek letter "chi" rather than the English letter "ex".
  595. Pronounce TeX as if the `X' were the last sound in the name `Bach'; but
  596. pronounce Texinfo as if the `x' were a `k'.  Spell "Texinfo" with a
  597. capital "T" and write the other letters in lower case.
  598.  
  599. 
  600. File: texinfo.info,  Node: Using Texinfo,  Next: Info Files,  Prev: Overview,  Up: Overview
  601.  
  602. Using Texinfo
  603. =============
  604.  
  605.   Using Texinfo, you can create a printed document with the normal
  606. features of a book, including chapters, sections, cross references, and
  607. indices.  From the same Texinfo source file, you can create a
  608. menu-driven, on-line Info file with nodes, menus, cross references, and
  609. indices.  You can, if you wish, make the chapters and sections of the
  610. printed document correspond to the nodes of the on-line information;
  611. and you use the same cross references and indices for both the Info
  612. file and the printed work.  `The GNU Emacs Manual' is a good example of
  613. a Texinfo file, as is this manual.
  614.  
  615.   To make a printed document, you process a Texinfo source file with the
  616. TeX typesetting program.  This creates a DVI file that you can typeset
  617. and print as a book or report.  (Note that the Texinfo language is
  618. completely different from TeX's usual language, plain TeX.)  If you do
  619. not have TeX, but do have `troff' or `nroff', you can use the
  620. `texi2roff' program instead.
  621.  
  622.   To make an Info file, you process a Texinfo source file with the
  623. `makeinfo' utility or Emacs's `texinfo-format-buffer' command; this
  624. creates an Info file that you can install on-line.
  625.  
  626.   TeX and `texi2roff' work with many types of printers; similarly, Info
  627. works with almost every type of computer terminal.  This power makes
  628. Texinfo a general purpose system, but brings with it a constraint,
  629. which is that a Texinfo file may contain only the customary
  630. "typewriter" characters (letters, numbers, spaces, and punctuation
  631. marks) but no special graphics.
  632.  
  633.   A Texinfo file is a plain ASCII file containing text and "@-commands"
  634. (words preceded by an `@') that tell the typesetting and formatting
  635. programs what to do.  You may edit a Texinfo file with any text editor;
  636. but it is especially convenient to use GNU Emacs since that editor has
  637. a special mode, called Texinfo mode, that provides various
  638. Texinfo-related features.  (*Note Texinfo Mode::.)
  639.  
  640.   Before writing a Texinfo source file, you should become familiar with
  641. the Info documentation reading program and learn about nodes, menus,
  642. cross references, and the rest.  (*note info: (info)Top, for more
  643. information.)
  644.  
  645.   You can use Texinfo to create both on-line help and printed manuals;
  646. moreover, Texinfo is freely redistributable.  For these reasons, Texinfo
  647. is the format in which documentation for GNU utilities and libraries is
  648. written.
  649.  
  650. 
  651. File: texinfo.info,  Node: Info Files,  Next: Printed Books,  Prev: Using Texinfo,  Up: Overview
  652.  
  653. Info files
  654. ==========
  655.  
  656.   An Info file is a Texinfo file formatted so that the Info
  657. documentation reading program can operate on it.  (`makeinfo' and
  658. `texinfo-format-buffer' are two commands that convert a Texinfo file
  659. into an Info file.)
  660.  
  661.   Info files are divided into pieces called "nodes", each of which
  662. contains the discussion of one topic.  Each node has a name, and
  663. contains both text for the user to read and pointers to other nodes,
  664. which are identified by their names.  The Info program displays one node
  665. at a time, and provides commands with which the user can move to other
  666. related nodes.
  667.  
  668.   *note info: (info)Top, for more information about using Info.
  669.  
  670.   Each node of an Info file may have any number of child nodes that
  671. describe subtopics of the node's topic.  The names of child nodes are
  672. listed in a "menu" within the parent node; this allows you to use
  673. certain Info commands to move to one of the child nodes.  Generally, an
  674. Info file is organized like a book.  If a node is at the logical level
  675. of a chapter, its child nodes are at the level of sections; likewise,
  676. the child nodes of sections are at the level of subsections.
  677.  
  678.   All the children of any one parent are linked together in a
  679. bidirectional chain of `Next' and `Previous' pointers.  The `Next'
  680. pointer provides a link to the next section, and the `Previous' pointer
  681. provides a link to the previous section.  This means that all the nodes
  682. that are at the level of sections within a chapter are linked together.
  683. Normally the order in this chain is the same as the order of the
  684. children in the parent's menu.  Each child node records the parent node
  685. name as its `Up' pointer.  The last child has no `Next' pointer, and the
  686. first child has the parent both as its `Previous' and as its `Up'
  687. pointer.(1) (*note Info Files-Footnotes::)
  688.  
  689.   The book-like structuring of an Info file into nodes that correspond
  690. to chapters, sections, and the like is a matter of convention, not a
  691. requirement.  The `Up', `Previous', and `Next' pointers of a node can
  692. point to any other nodes, and a menu can contain any other nodes.
  693. Thus, the node structure can be any directed graph.  But it is usually
  694. more comprehensible to follow a structure that corresponds to the
  695. structure of chapters and sections in a printed book or report.
  696.  
  697.   In addition to menus and to `Next', `Previous', and `Up' pointers,
  698. Info provides pointers of another kind, called references, that can be
  699. sprinkled throughout the text.  This is usually the best way to
  700. represent links that do not fit a hierarchical structure.
  701.  
  702.   Usually, you will design a document so that its nodes match the
  703. structure of chapters and sections in the printed output.  But
  704. occasionally there are times when this is not right for the material
  705. being discussed.  Therefore, Texinfo uses separate commands to specify
  706. the node structure for the Info file and the section structure for the
  707. printed output.
  708.  
  709.   Generally, you enter an Info file through a node that by convention is
  710. named `Top'.  This node normally contains just a brief summary of the
  711. file's purpose, and a large menu through which the rest of the file is
  712. reached.  From this node, you can either traverse the file
  713. systematically by going from node to node, or you can go to a specific
  714. node listed in the main menu, or you can search the index menus and then
  715. go directly to the node that has the information you want.
  716. Alternatively, with the standalone Info program, you can specify
  717. specific menu items on the command line (*note Top: (info)Top.).
  718.  
  719.   If you want to read through an Info file in sequence, as if it were a
  720. printed manual, you can hit <SPC> repeatedly, or you get the whole file
  721. with the advanced Info command `g *'.  (*note Advanced Info commands:
  722. (info)Expert.)
  723.  
  724.   The `dir' file in the `info' directory serves as the departure point
  725. for the whole Info system.  From it, you can reach the `Top' nodes of
  726. each of the documents in a complete Info system.
  727.  
  728. 
  729. File: texinfo.info,  Node: Info Files-Footnotes,  Up: Info Files
  730.  
  731.   (1) In some documents, the first child has no `Previous' pointer.
  732. Occasionally, the last child has the node name of the next following
  733. higher level node as its `Next' pointer.
  734.  
  735. 
  736. File: texinfo.info,  Node: Printed Books,  Next: Formatting Commands,  Prev: Info Files,  Up: Overview
  737.  
  738. Printed Books
  739. =============
  740.  
  741.   A Texinfo file can be formatted and typeset as a printed book or
  742. manual.  To do this, you need TeX, a powerful, sophisticated typesetting
  743. program written by Donald Knuth.(1) (*note Printed Books-Footnotes::)
  744.  
  745.   A Texinfo-based book is similar to any other typeset, printed work: it
  746. can have a title page, copyright page, table of contents, and preface,
  747. as well as chapters, numbered or unnumbered sections and subsections,
  748. page headers, cross references, footnotes, and indices.
  749.  
  750.   You can use Texinfo to write a book without ever having the intention
  751. of converting it into on-line information.  You can use Texinfo for
  752. writing a printed novel, and even to write a printed memo, although
  753. this latter application is not recommended since electronic mail is so
  754. much easier.
  755.  
  756.   TeX is a general purpose typesetting program.  Texinfo provides a
  757. file called `texinfo.tex' that contains information (definitions or
  758. "macros") that TeX uses when it typesets a Texinfo file.
  759. (`texinfo.tex' tells TeX how to convert the Texinfo @-commands to TeX
  760. commands, which TeX can then process to create the typeset document.)
  761. `texinfo.tex' contains the specifications for printing a document.
  762.  
  763.   Most often, documents are printed on 8.5 inch by 11 inch pages (216mm
  764. by 280mm; this is the default size), but you can also print for 7 inch
  765. by 9.25 inch pages (178mm by 235mm; the `@smallbook' size) or on
  766. European A4 size paper (`@afourpaper').  (*Note Printing "Small" Books:
  767. smallbook.  Also, see *Note Printing on A4 Paper: A4 Paper.)
  768.  
  769.   By changing the parameters in `texinfo.tex', you can change the size
  770. of the printed document.  In addition, you can change the style in
  771. which the printed document is formatted; for example, you can change the
  772. sizes and fonts used, the amount of indentation for each paragraph, the
  773. degree to which words are hyphenated, and the like.  By changing the
  774. specifications, you can make a book look dignified, old and serious, or
  775. light-hearted, young and cheery.
  776.  
  777.   TeX is freely distributable.  It is written in a superset of Pascal
  778. called WEB and can be compiled either in Pascal or (by using a
  779. conversion program that comes with the TeX distribution) in C.  (*Note
  780. TeX Mode: (emacs)TeX Mode, for information about TeX.)
  781.  
  782.   TeX is very powerful and has a great many features.  Because a
  783. Texinfo file must be able to present information both on a
  784. character-only terminal in Info form and in a typeset book, the
  785. formatting commands that Texinfo supports are necessarily limited.
  786.  
  787.   *Note How to Obtain TeX: Obtaining TeX.
  788.  
  789. 
  790. File: texinfo.info,  Node: Printed Books-Footnotes,  Up: Printed Books
  791.  
  792.   (1) You can also use the `texi2roff' program if you do not have TeX;
  793. since Texinfo is designed for use with TeX, `texi2roff' is not
  794. described here.  `texi2roff' is not part of the standard GNU
  795. distribution.
  796.  
  797. 
  798. File: texinfo.info,  Node: Formatting Commands,  Next: Conventions,  Prev: Printed Books,  Up: Overview
  799.  
  800. @-commands
  801. ==========
  802.  
  803.   In a Texinfo file, the commands that tell TeX how to typeset the
  804. printed manual and tell `makeinfo' and `texinfo-format-buffer' how to
  805. create an Info file are preceded by `@'; they are called "@-commands".
  806. For example, `@node' is the command to indicate a node and `@chapter'
  807. is the command to indicate the start of a chapter.
  808.  
  809.      *Please note:* All the @-commands, with the exception of the
  810.      `@TeX{}' command, must be written entirely in lower case.
  811.  
  812.   The Texinfo @-commands are a strictly limited set of constructs.  The
  813. strict limits make it possible for Texinfo files to be understood both
  814. by TeX and by the code that converts them into Info files.  You can
  815. display Info files on any terminal that displays alphabetic and numeric
  816. characters.  Similarly, you can print the output generated by TeX on a
  817. wide variety of printers.
  818.  
  819.   Depending on what they do or what arguments(1) (*note Formatting
  820. Commands-Footnotes::) they take, you need to write @-commands on lines
  821. of their own or as part of sentences:
  822.  
  823.    * Write a command such as `@noindent' at the beginning of a line as
  824.      the only text on the line.  (`@noindent' prevents the beginning of
  825.      the next line from being indented as the beginning of a paragraph.)
  826.  
  827.    * Write a command such as `@chapter' at the beginning of a line
  828.      followed by the command's arguments, in this case the chapter
  829.      title, on the rest of the line.  (`@chapter' creates chapter
  830.      titles.)
  831.  
  832.    * Write a command such as `@dots{}' wherever you wish but usually
  833.      within a sentence. (`@dots{}' creates dots ...)
  834.  
  835.    * Write a command such as `@code{SAMPLE-CODE}' wherever you wish
  836.      (but usually within a sentence) with its argument, SAMPLE-CODE in
  837.      this example, between the braces.  (`@code' marks text as being
  838.      code.)
  839.  
  840.    * Write a command such as `@example' at the beginning of a line of
  841.      its own; write the body-text on following lines; and write the
  842.      matching `@end' command, `@end example' in this case, at the
  843.      beginning of a line of its own after the body-text. (`@example'
  844.      ... `@end example' indents and typesets body-text as an example.)
  845.  
  846. As a general rule, a command requires braces if it mingles among other
  847. text; but it does not need braces if it starts a line of its own.  The
  848. non-alphabetic commands, such as `@:', are exceptions to the rule; they
  849. do not need braces.
  850.  
  851.   As you gain experience with Texinfo, you will rapidly learn how to
  852. write the different commands: the different ways to write commands make
  853. it easier to write and read Texinfo files than if all commands followed
  854. exactly the same syntax.  (For details about @-command syntax, see
  855. *Note @-Command Syntax: Command Syntax.)
  856.  
  857. 
  858. File: texinfo.info,  Node: Formatting Commands-Footnotes,  Up: Formatting Commands
  859.  
  860.   (1) The word "argument" comes from the way it is used in mathematics
  861. and does not refer to a disputation between two people; it refers to the
  862. information presented to the command.  According to the `Oxford English
  863. Dictionary', the word derives from the Latin for "to make clear,
  864. prove"; thus it came to mean `the evidence offered as proof', which is
  865. to say, `the information offered', which led to its mathematical
  866. meaning.  In its other thread of derivation, the word came to mean `to
  867. assert in a manner against which others may make counter assertions',
  868. which led to the meaning of `argument' as a disputation.
  869.  
  870. 
  871. File: texinfo.info,  Node: Conventions,  Next: Comments,  Prev: Formatting Commands,  Up: Overview
  872.  
  873. General Syntactic Conventions
  874. =============================
  875.  
  876.   All printable ASCII characters except `@', `{' and `}' can appear in
  877. a Texinfo file and stand for themselves.  `@' is the escape character
  878. which introduces commands.  `{' and `}' should be used only to surround
  879. arguments to certain commands.  To put one of these special characters
  880. into the document, put an `@' character in front of it, like this:
  881. `@@', `@{', and `@}'.
  882.  
  883.   It is customary in TeX to use doubled single-quote characters to
  884. begin and end quotations: ` ` and ' ' (but without a space between the
  885. two single-quote characters).  This convention should be followed in
  886. Texinfo files.  TeX converts doubled single-quote characters to left-
  887. and right-hand doubled quotation marks and Info converts doubled
  888. single-quote characters to ASCII double-quotes: ` ` and ' ' to " .
  889.  
  890.   Use three hyphens in a row, `---', for a dash--like this.  In TeX, a
  891. single or double hyphen produces a printed dash that is shorter than
  892. the usual typeset dash. Info reduces three hyphens to two for display
  893. on the screen.
  894.  
  895.   To prevent a paragraph from being indented in the printed manual, put
  896. the command `@noindent' on a line by itself before the paragraph.
  897.  
  898.   If you mark off a region of the Texinfo file with the `@iftex' and
  899. `@end iftex' commands, that region will appear only in the printed
  900. copy; in that region, you can use certain commands borrowed from plain
  901. TeX that you cannot use in Info.  Likewise, if you mark off a region
  902. with the `@ifinfo' and `@end ifinfo' commands, that region will appear
  903. only in the Info file; in that region, you can use Info commands that
  904. you cannot use in TeX.  Similarly for `@ifhtml ... @end ifhtml',
  905. `@ifnothtml ... @end ifnothtml', `@ifnotinfo ... @end ifnotinfo',
  906. `@ifnottex ... @end ifnottex', *Note Conditionals::.
  907.  
  908.      *Caution:* Do not use tabs in a Texinfo file!  TeX uses
  909.      variable-width fonts, which means that it cannot predefine a tab
  910.      to work in all circumstances.  Consequently, TeX treats tabs like
  911.      single spaces, and that is not what they look like.  Furthermore,
  912.      `makeinfo' does nothing special with tabs, and thus a tab character
  913.      in your input file may appear differently in the output.
  914.  
  915.      To avoid this problem, Texinfo mode causes GNU Emacs to insert
  916.      multiple spaces when you press the <TAB> key.
  917.  
  918.      Also, you can run `untabify' in Emacs to convert tabs in a region
  919.      to multiple spaces.
  920.  
  921.      Don't use tabs.
  922.  
  923. 
  924. File: texinfo.info,  Node: Comments,  Next: Minimum,  Prev: Conventions,  Up: Overview
  925.  
  926. Comments
  927. ========
  928.  
  929.   You can write comments in a Texinfo file that will not appear in
  930. either the Info file or the printed manual by using the `@comment'
  931. command (which may be abbreviated to `@c').  Such comments are for the
  932. person who reads the Texinfo file.  All the text on a line that follows
  933. either `@comment' or `@c' is a comment; the rest of the line does not
  934. appear in either the Info file or the printed manual. (Often, you can
  935. write the `@comment' or `@c' in the middle of a line, and only the text
  936. that follows after the `@comment' or `@c' command does not appear; but
  937. some commands, such as `@settitle' and `@setfilename', work on a whole
  938. line.  You cannot use `@comment' or `@c' in a line beginning with such
  939. a command.)
  940.  
  941.   You can write long stretches of text that will not appear in either
  942. the Info file or the printed manual by using the `@ignore' and `@end
  943. ignore' commands.  Write each of these commands on a line of its own,
  944. starting each command at the beginning of the line.  Text between these
  945. two commands does not appear in the processed output.  You can use
  946. `@ignore' and `@end ignore' for writing comments.  Often, `@ignore' and
  947. `@end ignore' is used to enclose a part of the copying permissions that
  948. applies to the Texinfo source file of a document, but not to the Info
  949. or printed version of the document.
  950.  
  951. 
  952. File: texinfo.info,  Node: Minimum,  Next: Six Parts,  Prev: Comments,  Up: Overview
  953.  
  954. What a Texinfo File Must Have
  955. =============================
  956.  
  957.   By convention, the names of Texinfo files end with one of the
  958. extensions `.texinfo', `.texi', or `.tex'.  The longer extension is
  959. preferred since it describes more clearly to a human reader the nature
  960. of the file.  The shorter extensions are for operating systems that
  961. cannot handle long file names.
  962.  
  963.   In order to be made into a printed manual and an Info file, a Texinfo
  964. file *must* begin with lines like this:
  965.  
  966.      \input texinfo
  967.      @setfilename INFO-FILE-NAME
  968.      @settitle NAME-OF-MANUAL
  969.  
  970. The contents of the file follow this beginning, and then you *must* end
  971. a Texinfo file with a line like this:
  972.  
  973.      @bye
  974.  
  975. The `\input texinfo' line tells TeX to use the `texinfo.tex' file,
  976. which tells TeX how to translate the Texinfo @-commands into TeX
  977. typesetting commands.  (Note the use of the backslash, `\'; this is
  978. correct for TeX.)  The `@setfilename' line provides a name for the Info
  979. file and tells TeX to open auxiliary files.  The `@settitle' line
  980. specifies a title for the page headers (or footers) of the printed
  981. manual.
  982.  
  983.   The `@bye' line at the end of the file on a line of its own tells the
  984. formatters that the file is ended and to stop formatting.
  985.  
  986.   Usually, you will not use quite such a spare format, but will include
  987. mode setting and start-of-header and end-of-header lines at the
  988. beginning of a Texinfo file, like this:
  989.  
  990.      \input texinfo   @c -*-texinfo-*-
  991.      @c %**start of header
  992.      @setfilename INFO-FILE-NAME
  993.      @settitle NAME-OF-MANUAL
  994.      @c %**end of header
  995.  
  996. In the first line, `-*-texinfo-*-' causes Emacs to switch into Texinfo
  997. mode when you edit the file.
  998.  
  999.   The `@c' lines which surround the `@setfilename' and `@settitle'
  1000. lines are optional, but you need them in order to run TeX or Info on
  1001. just part of the file.  (*Note Start of Header::, for more information.)
  1002.  
  1003.   Furthermore, you will usually provide a Texinfo file with a title
  1004. page, indices, and the like.  But the minimum, which can be useful for
  1005. short documents, is just the three lines at the beginning and the one
  1006. line at the end.
  1007.  
  1008. 
  1009. File: texinfo.info,  Node: Six Parts,  Next: Short Sample,  Prev: Minimum,  Up: Overview
  1010.  
  1011. Six Parts of a Texinfo File
  1012. ===========================
  1013.  
  1014.   Generally, a Texinfo file contains more than the minimal beginning
  1015. and end--it usually contains six parts:
  1016.  
  1017. 1. Header
  1018.      The "Header" names the file, tells TeX which definitions' file to
  1019.      use, and performs other "housekeeping" tasks.
  1020.  
  1021. 2. Summary Description and Copyright
  1022.      The "Summary Description and Copyright" segment describes the
  1023.      document and contains the copyright notice and copying permissions
  1024.      for the Info file.  The segment must be enclosed between `@ifinfo'
  1025.      and `@end ifinfo' commands so that the formatters place it only in
  1026.      the Info file.
  1027.  
  1028. 3. Title and Copyright
  1029.      The "Title and Copyright" segment contains the title and copyright
  1030.      pages and copying permissions for the printed manual.  The segment
  1031.      must be enclosed between `@titlepage' and `@end titlepage'
  1032.      commands.  The title and copyright page appear only in the printed
  1033.      manual.
  1034.  
  1035. 4. `Top' Node and Master Menu
  1036.      The "Master Menu" contains a complete menu of all the nodes in the
  1037.      whole Info file.  It appears only in the Info file, in the `Top'
  1038.      node.
  1039.  
  1040. 5. Body
  1041.      The "Body" of the document may be structured like a traditional
  1042.      book or encyclopedia or it may be free form.
  1043.  
  1044. 6. End
  1045.      The "End" contains commands for printing indices and generating
  1046.      the table of contents, and the `@bye' command on a line of its own.
  1047.  
  1048.